/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.creational.singleton;

/**
 *
 * @author jmg
 */
public class Singleton {
    
    private static Singleton instance;
    private int state;
    
    private Singleton(){
        
    }
    
    
    public static synchronized Singleton getInstance(){
        
        if(instance == null){
            instance = new Singleton();
        }
        
        return instance;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }
    
    
    
}
